<div id="content-header">
    <div id="breadcrumb"> 
    	<a ui-sref="home.company" title="Go to Home" class="tip-bottom">
    		<i class="icon-home"></i> 销售管理</a> 
    		<a ui-sref="home.company" class="current">客户单位
    	</a> 
    </div>
  </div>
  <div class="col-sm-12 col-md-5" style="padding-top: 50px;width: 100%	;">
	<button ng-click="columnAdd('','add')" class="btn  btn-primary btnheight">添加</button>
	<div class="col-md-13">
		<div id="datatable-buttons_filter" class="dataTables_filter" >
			<label style="float: left;">
				<input type="search" ng-model="key" class="form-control inputweight" 
					placeholder="" aria-controls="datatable-buttons">
					<button  class="btn  btn-primary btnheight btn-inquiry" ng-click="search(pageNum)">查询</button>
			</label>
		</div>
	</div>
</div>
  <div class="container-fluid">
    <div class="row-fluid">
      <div class="span12">
 
			<div class="widget-box">
          <div class="widget-content nopadding">
            <table class="table table-bordered data-table">
              <thead>
                <tr>
                  <th width="20%" >公司名称</th>
                  <th width="10%">经营产品</th>
                  <th width="10%">经营范围</th>
                  <th width="10%">单位地址</th>
                  <th width="10%">公司类型</th>
                  
                  <th width="15%">操作</th>
                </tr>
              </thead>
              <tbody>
                <tr class="gradeX" bindonce ng-repeat="o in list">
                  <td bo-text="o.cName"></td>
                  <td bo-text="o.cProduct"></td>
                   <td bo-text="o.cScope"></td>
                  
                  <td bo-text="o.cAddress"></td>
                   <td bo-text="o.typeName"></td>
                  <td>
                  	<button ng-click="columnAdd(o.cId,'up')" class="btn  btn-primary">修改</button>
                  	<button class="btn  btn-danger" ng-click="modelClick(o.cId)">删除</button>
                  </td>
                </tr>
                 <tr class="gradeX"  ng-if="totalSize==0||totalSize==undefined"  class="even">
	            	<td colspan="8"> 暂无数据</td>
	           	</tr>
              </tbody>
            </table>
          </div>
        </div>
         <div class="fy" ng-if="totalSize>0">
									<p>共<span>{{totalSize}}</span>条记录，<span>{{pageNum}}</span>/<span>{{totalNum}}</span>页</p>
									<ul uib-pagination 
										first-text="首页" 
										last-text='末页' 
										next-text='下一页' 
										previous-text='上一页' 
										total-items="totalSize" 
										items-per-page='pageSize' 
										boundary-link-numbers='true' 
										max-size='3' boundary-links='true' 
										ng-model="$parent.tj.current" 
										ng-change='search(tj.current)'>
									</ul>
									<p>到第<input placeholder="{{pageNum}}" ng-change="pageUp()" ng-model="$parent.tj.page" />页</p>
									<span ng-click="toPage($parent.tj.page)">前往</span>
			</div>
					
      </div>
    </div>
 </div>
 


<script type="text/ng-template" id="companyAdds.html">
			<style>
				.modal-content{
					width: 600px;
					margin-left: 180px;
				}
				.table_input{
					width:256px;text-indent: .1rem;height: 36px;
				}
				.table_span{
					display: block;width:100px;
				}
				
			</style>
			<div class="modal-header" style="text-align: center;font-size: 24px;background: #4092E8;color: white;height:50px;line-height: 50px">
				<div style="margin-top: -8px;">
					{{sername}}
				</div>
				<button style="color:white;float: right;background: #4092e8;border: none;outline: none;box-shadow: none;margin-top: -35px;" class="btn " type="button" ng-click="cancel()">[关闭]</button>
			</div>
			<div class="modal-body" >
				<div class="adduser" >

					<div style="    margin-left: 40px;">
						<form novalidate="novalidate" name="form">
							<div style="margin: 10px 0;display: flex;align-items: center;">
								<span class="table_span" >公司名称：</span>
								<input class="table_input"    type="text" value="" name="cName" ng-model="param.cName" required>
								<span class="error bigError "  ng-show="form.cName.$error.required" style="font-size: 18px;font-weight: bold;">*</span>
							</div>
							<div style="margin: 10px 0;display: flex;align-items: center;">
								<span class="table_span" >经营范围：</span>
								<input class="table_input"    type="text" value="" name="cScope" ng-model="param.cScope" >
							</div>
							<div style="margin: 10px 0;display: flex;align-items: center;">
								<span class="table_span" >开户行名称：</span>
								<input class="table_input"    type="text" value="" name="cBank" ng-model="param.cBank" >
							</div>
							<div style="margin: 10px 0;display: flex;align-items: center;">
								<span class="table_span" >银行名称：</span>
								<input class="table_input"    type="text" value="" name="cBankAmount" ng-model="param.cBankAmount" >
							</div>
							<div style="margin: 10px 0;display: flex;align-items: center;">
								<span class="table_span" >单位地址：</span>
								<input class="table_input"    type="text" value="" name="cAddress" ng-model="param.cAddress" >
							</div>
							<div style="margin: 10px 0;display: flex;align-items: center;">
								<span class="table_span" >公司传真：</span>
								<input class="table_input"    type="text" value="" name="cFax" ng-model="param.cFax" >
							</div>
							<div style="margin: 10px 0;display: flex;align-items: center;">
								<span class="table_span" >公司类型：</span>
								<select  class="table_input"  ng-model="param.cType"  
                    			ng-options="o.diId as o.diName for o in param.typeDic"></select>
                    			<span class="error bigError "  ng-show="param.cType==''" style="font-size: 18px;font-weight: bold;">*</span>
							</div>
							<div style="margin: 10px 0;display: flex;align-items: center;">
								<span class="table_span" >经营产品：</span>
								<input class="table_input"    type="text" value="" name="cProduct" ng-model="param.cProduct" >
							</div>
						</form>

					</div>
				</div>
			</div>
			<div class="modal-footer" style="position: relative;height:50px;">
				<div style="display: flex;justify-content: flex-end;padding: 0;position: absolute;right: 20px;top: 0.1rem;">
					
					<button  class="" ng-disabled="form.$invalid||param.cType==''" ng-class="{true:'btn btn-primary'}[form.$invalid||param.cType=='']" 
						style="width: 100px;border-radius: 0;line-height: 32px;background-color:#4092e8 ;border:#4092e8 ; font-size: 13px;color: white;font-size: 14px;"
						ng-click="ok(form.$invalid)">保 存</button>
				</div>
			</div>
		</script>
